package com.easyweb.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.easyweb.dao.BaseDao;
import com.easyweb.dao.UserDao;
import com.easyweb.model.Users;
@Repository
public class UserDaoImpl extends BaseDao implements UserDao{

	public int insertUsers(Users users) {
		return getSqlSession().insert("users.insertUser",users);
	}

	public int deleteUsersById(Map<String, Object> map) {
		return getSqlSession().delete("users.deleteUserById", map);
	}

	public int updateUsers(Users users) {
		return getSqlSession().update("users.updateUserById", users);
	}

	public List<Users> getUsers(Map<String, Object> map) {
		return getSqlSession().selectList("users.selectUsers", map);
	}

	public Users getUsersById(Map<String, Object> map) {
		return getSqlSession().selectOne("users.selectUsers", map);
	}

}
